<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">


    <link href="css/bootstrap.min.css" rel="stylesheet">

    <title>Document</title>
</head>


<div class="container-fluid  ">
    <div class="row">
        <div class="col-4"></div>
        <!-- 登陆界面 -->
        <div class="col-4 " style="margin-top: 80px;">
            <p class="text-center text-muted">管理员登录</p>
            <form method="post" action="LoginServlet">

                <label for="userName">用户名:</label>
				<input type="text" class="form-control" name="userName" id="userName">
				<label for="pwd">密码:</label>
				<input type="password" class="form-control" name="pwd" id="pwd"><br>
				<label for="validationCode">验证码:</label>


                <input type="text" name="validationCode" style="width: 50px;height: 20px">
                <img src="/users/ValidationServlet"  id="validationCode" ><br>
<%--                <input type="text" name="yzm" id="yzm"><input type="text" style="color: cadetblue;" class="text-center" id="yzm2" onclick="ChangeV()" placeholder="059g">--%>
                <input class="btn btn-primary" type="submit" value="提交">

            </form>
        </div>
        <div class="col-4"></div>
    </div>


</div>

</body>
<script src="jquery/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="jquery/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
    // function ChangeV() {
    //     var changevld;
    //     $.post("ChangeVld", {}, function (data) {
    //          var json=JSON.parse(data);
    //         $("#yzm2").val(json);
    //     })
    //
    // }
    $('#validationCode').click(function () {
        //加上时间戳就可以和原来的额src地址有区别，如果他们两个地址没有区别，浏览器默认是同一个，并不会刷新验证码图片
        $(this).attr('src','/users/ValidationServlet?time='+ new Date().getTime());
    });
</script>
</html>